pub fn match_fn() {
    let num = 13;

    match num {
        1 => println!("num is {}", num),
        2 | 3 => println!("num is {}", num),
        4..=19 => println!("num is {} ,A team", num),
        _ => println!("Ain't special: {}", num),
    }

    let bool = true;
    let binary = match bool {
        true => 0,
        false => 1,
    };
    println!("{}", binary);
}

enum Action {
    Say(String),
    MoveTo(i32, i32),
    ChangeColorRGB(u16, u16, u16),
}

pub fn enum_action_fn() {
    let actions = [
        Action::Say("Say Hello".to_string()),
        Action::MoveTo(1, 1),
        Action::ChangeColorRGB(255, 255, 255),
    ];
    for action in actions {
        match action {
            Action::Say(s) => {
                println!("{}", s)
            }
            Action::MoveTo(_x, _y) => println!("move to {},{}", _x, _y),
            Action::ChangeColorRGB(r, g, b) => println!("change color {},{},{}",r,g,b),
        }
    }
}


